Repository navigation
fix(rendering): fall back to FXC when bundled DXC fails to load on Windows - #3902
Merged
Merged
Conversation
|
Sandchest reviewed Sandchest reviews every change for vulnerabilities an attacker could use · 1 credit · Review details |
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Member
Author
|
hey @greptileai, please re-review the PR |
Member
Author
|
hey @greptileai, please re-review the PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

On Windows the editor could fail to open with only
No GPU adapter foundin the logs, on machines with DX12 GPUs (user reports: AMD Vega 10, Intel HD 630 on Windows 10). Windows always has WARP, so zero adapters means the DX12 backend itself never initialised.vendor/wgpu-hal/src/dx12/instance.rs:69turns aDynamicDxcload failure intoInstanceError("Failed to load dynamic DXC"). wgpu-core'stry_add_halonlylog::debug!s it and leaves the instance with no DX12 backend, socreate_shared_devicefinds nothing and returnsNoAdapter.create_wgpu_instance_sync(crates/rendering/src/lib.rs) now checks whether the DX12 backend came up (Instance::as_hal::<Dx12>(), a pointer check, no extra enumeration). If it did not, it logs a warning and rebuilds the instance withDx12Compiler::Fxc, which ships with Windows. This is the compiler Cap used on Windows before fix(desktop): use DXC for Windows shaders #2135.OnceLock, so every later instance (editor, export, preview, camera blur) goes straight to FXC instead of retrying DXC.create_shared_deviceskips software adapters. WARP crashes (0xc0000005at the firstqueue.submit) running frames whose shaders FXC compiled, so a machine whose only adapter is WARP keeps today'sNoAdaptererror instead of crashing.dx12_compiler_fallback_tests(Windows only, runs in the A/V Sync Tests Windows job) points DXC at zero-bytedxcompiler.dll/dxil.dll, asserts that instance has no adapters, then asserts the fallback picks FXC, creates a device and builds every production pipeline (RendererLayers,TransitionCompositor) without errors. A second test asserts a loadable bundled DXC is kept.No GPU adapter found, editor and export unusableNo GPU adapter foundNo GPU adapter foundplus the load error in the logThe whole
cap-renderingsuite on an NVIDIA T4 (Windows Server 2022, DX12) gives the same result on FXC as on DXC:The single failure (
decoder::ffmpeg::tests::borrowed_planes_render_the_same_rgba_as_the_copy_path) fails identically on both compilers. FXC builds pipelines more slowly, which is why DXC stays the default; the fallback only runs when DXC cannot load.

Confidence Score: 5/5
The PR appears safe to merge; no new blocking issues were found.Summary
The PR retries Windows DX12 startup with FXC when bundled DXC cannot load. It caches that choice and excludes software adapters on the fallback.
Reviews (3) · Last reviewed commit: "test(rendering): drop the temporary WARP..." · Reviewed by Greptile